<template>
  <el-container>
    <div style="width: 100%; margin-top: 20px;">
      <el-row :gutter="20">
        <el-col :span="3" :offset="2">
          <div>
            <el-row>
              <el-col>
                <div class="left-item" v-if="urose==1">
                  <el-card>
                    <div slot="header" class="clearfix" style="padding: 0; height: 50px;">
                      <span>讲师中心</span>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/lecturerInfo">讲师信息</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/luboCourse">录播课程</router-link>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col>
                <div class="left-item" v-if="urose==1">
                  <el-card>
                    <div slot="header" class="clearfix" style="padding: 0; height: 50px;">
                      <span>收益中心</span>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/profit">收益情况</router-link>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col>
                <div class="left-item">
                  <el-card>
                    <div slot="header" class="clearfix" style="padding: 0; height: 50px;">
                      <span>课程中心</span>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/myCourse">我的课程</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/myCollection">我的收藏</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/studyRecord">学习记录</router-link>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col>
                <div class="left-item">
                  <el-card>
                    <div slot="header" class="clearfix" style="padding: 0; height: 50px;">
                      <span>个人资料</span>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/dBasicInformation">个人信息</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/dUpdate">修改密码</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/myOrder">我的订单</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/attention">我的关注</router-link>
                    </div>
                    <div class="item">
                      <router-link :underline="false" to="/message">我的通知</router-link>
                    </div>
                  </el-card>
                </div>
              </el-col>
            </el-row>
          </div>
        </el-col>
        <el-col :span="17">
          <div style="background: white">
            <router-view/>
          </div>
        </el-col>
      </el-row>
    </div>
  </el-container>
</template>

<script>
export default {
  name: "PersonalCenterBody",
  created() {
    console.log(this.$router.currentRoute.name);
    console.log(this.$router.currentRoute.path);
    let urose = sessionStorage.getItem("urose");
    //alert(urose)
    this.urose=urose;
  },
  data() {
    return {
      activeName: 'first',
      urose:'',
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    }
  },
}
</script>

<style>
.el-row {
  margin-bottom: 20px;
}

.el-col {
  border-radius: 4px;
}

/*div.el-card__header{*/
/*  padding: 0;*/
/*  height: 50px;*/
/*}*/

.left-item .el-card__body{
  padding: 0;
}

.left-item .el-card__header{
  padding: 0;
  height: 50px;
}

.router-link-active{
  text-decoration: none;
}
a:-webkit-any-link {
  color: -webkit-link;
  cursor: pointer;
  text-decoration: none;
}
.clearfix{
  padding: 0;
  height: 50px;
}
  a{
    text-decoration:none;
    color: black;
  }
</style>
